<%-------------------------------------------------------------------
 * 页面名称：/page/myspace/accountHisQueryDetail.jsp
 * 功能描述：交易详细信息
 * Action: 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="cn.agiledata.bank.common.util.Constant"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%@ page import="cn.agiledata.bank.common.util.Constant"%>
<%@ page import="cn.agiledata.bank.account.service.IAccountConst"%>
<%@ page import="cn.agiledata.bank.account.service.AccountSummary"%>
<%
	String path = request.getContextPath();
	// 取得Session中用户登录信息
	AccountSummary user = (AccountSummary) session
			.getAttribute(Constant.SESSION_ACCOUNT_SUMMARY);
%>
<script type='text/javascript'
	src='<%=path%>/js/vnv/commonForCnAmount.js'></script>
<script type='text/javascript' src='<%=path%>/js/vnv/tomoney.js'></script>
<script language="javascript">
function printPaper(transId) {
    var url = "<%=path%>/page/myspace/printPaper.do?transId="+transId;
    window.open(url,'','left=100,top=200,width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollar=no');
}
function confirmPrint() {
    var s = "您是否做了页面提示上所述的设置？选择[确定]进入打印，选择[取消]进行设置";
    if(!confirm(s)) return false;
    else return true;
}
function toUrl(url){
    location.href = url;
}
function sendMessage(transId){
	frames['netreturn'].document.netReturnForm.transId.value=transId;
    alert('编号为'+frames['netreturn'].document.netReturnForm.transId.value+'交易成功通知已发送!!!');
	frames['netreturn'].document.netReturnForm.submit();
}

</script>

<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				交易详细信息
			</div>
			<div class="edit_pass">
				<table width="100%" border="0" align="center" cellpadding="5"
					cellspacing="1">
					<logic:notEqual name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_A%>">
						<logic:notEqual name="aqb" property="actionType"
							value="<%=Constant.ACTION_TYPE_X%>">
							<logic:notEqual name="aqb" property="actionType"
								value="<%=Constant.ACTION_TYPE_Y%>">
								<logic:notEmpty name="aqb" property="orderId">
									<tr>
										<td height="25" align="right">
											商户订单号：
										</td>
										<td height="25">
											<bean:write name="aqb" property="orderId" />
										</td>
									</tr>
								</logic:notEmpty>
							</logic:notEqual>
						</logic:notEqual>
					</logic:notEqual>
					<logic:equal name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_E%>">
						<logic:notEmpty name="relatingTransId">
							<tr>
								<td height="25" align="right">
									关联交易编号：
								</td>
								<td>
									<a
										href="<%=path%>/page/transaction/accountHisQueryDetail.do?transactionID=<bean:write name="aqb" property="t.relating"/>"><bean:write
											name="relatingTransId" /> </a>
								</td>
							</tr>
						</logic:notEmpty>
					</logic:equal>
					<!--交易编号-->
					<tr>
						<td width="23%" height="25" align="right">
							交易编号：
						</td>
						<td width="77%" height="25">
							<bean:write name="aqb" property="transId" />
						</td>
					</tr>
					<logic:notEqual name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_E%>">
						<tr>
							<td height="25" align="right">
								从：
							</td>
							<td height="25">
								<bean:write name="aqb" property="fromAccountName" />
								<logic:notEmpty name="aqb" property="fromSubAccountName">
									<span class="font_gray"><bean:write name="aqb"
											property="fromSubAccountName" /> </span>
								</logic:notEmpty>
								<logic:notEmpty name="aqb" property="t.cardNo">
									<span class="font_gray">(<bean:write name="aqb"
											property="t.cardNo" />) </span>
								</logic:notEmpty>
							</td>
						</tr>
					</logic:notEqual>
					<tr>
						<td height="25" align="right">
							到：
						</td>
						<td height="25">
							<bean:write name="aqb" property="toAccountName" />
							<logic:notEmpty name="aqb" property="toSubAccountName">
								<span class="font_gray"><bean:write name="aqb"
										property="toSubAccountName" /> </span>
							</logic:notEmpty>
						</td>

					</tr>
					<tr>
						<td height="25" align="right">
							交易类型：
						</td>
						<td height="25">
							<bean:write name="aqb" property="actionTypeName" />
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							金额：
						</td>
						<td height="25">
							￥
							<ad:FormatPrase>
								<bean:write name="aqb" property="amount" />
							</ad:FormatPrase>
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							费用：
						</td>
						<td height="25">
							￥
							<ad:FormatPrase>
								<bean:write name="aqb" property="fee" />
							</ad:FormatPrase>
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							实际交易额（
							<bean:write name="aqb" property="payMode" />
							）：
						</td>
						<td height="25">
							￥
							<ad:FormatPrase>
								<bean:write name="aqb" property="realTrasAmount" />
							</ad:FormatPrase>
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							交易状态：
						</td>
						<td height="25">
							<ad:write typeid="TRANS_STATUS" name="aqb"
								property="transStatus" />
						</td>
					</tr>
					<logic:present name="hasleft">
						<tr>
							<td height="25" align="right">
								交易期限：
							</td>
							<td height="25">
								<logic:equal name="aqb" property="transStatus" value="1">
        若<bean:write name="date" />天无操作,对于该笔交易,系统自动进行退款操作,请抓紧<br />
								</logic:equal>
								<logic:equal name="aqb" property="transStatus" value="2">
        若<bean:write name="date" />天无操作,对于该笔交易,系统自动进行收货确认操作,请抓紧<br />
								</logic:equal>
								<logic:equal name="aqb" property="transStatus" value="7">
        若<bean:write name="date" />天无操作,对于该笔交易,系统自动进行退款成功操作,请抓紧<br />
								</logic:equal>
								交易自动提交时间
								<font color="red">
								<b>
								<bean:write name="lastdate" format="yyyy-MM-dd HH:mm:ss" />
								</b>
								</font>
								<br />
								交易自动提交剩余时间
								<font color="red">
								<span id="leftClocks"></span></font>
							</td>
						</tr>
						<script language=javascript>
    var days = parseInt("<bean:write name="leftDays"/>");
    var hours = parseInt("<bean:write name="leftHours"/>");
    var minutes = parseInt("<bean:write name="leftMinutes"/>");
    var seconds = days*24*60*60+hours*60*60+minutes*60;
    function show_date_time(){
        window.setTimeout("show_date_time()", 1000);
        var dayshow = Math.floor(seconds/(24*60*60));
        var hourshow  = Math.floor((seconds-dayshow*24*60*60)/(60*60));
        var minuteshow = Math.floor((seconds-dayshow*24*60*60-hourshow*60*60)/60);
        var secondshow = seconds-dayshow*24*60*60-hourshow*60*60-minuteshow*60;
        document.getElementById("leftClocks").innerHTML="<b>"+dayshow+"天"+hourshow+"小时"+minuteshow+"分"+secondshow+"秒"+"<b>" ;
        seconds--;
    }
    show_date_time();
 </script>
					</logic:present>
					<logic:notEmpty name="aqb" property="tradeType">
						<tr>
							<td height="25" align="right">
								交易模式：
							</td>
							<td height="25">
								<ad:write typeid="TRADE_TYPE" name="aqb" property="tradeType" />
							</td>
						</tr>
					</logic:notEmpty>
					<tr>
						<td height="25" align="right">
							交易开始日期：
						</td>
						<td height="25">
							<bean:write name="aqb" format="yyyy-MM-dd HH:mm:ss"
								property="beginDate" />
						</td>
					</tr>
					<tr>
						<td height="25" align="right">
							交易结束日期：
						</td>
						<td height="25">
							<bean:write name="aqb" format="yyyy-MM-dd HH:mm:ss"
								property="endDate" />
						</td>
					</tr>
					<!-- 提现 -->
					<logic:equal name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_D%>">
						<logic:empty name="aqb" property="directCardNo">
							<tr>
								<td height="25" align="right">
									银行：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bank" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									卡号：
								</td>
								<td height="25">
									<bean:write name="aqb" property="cardNo" />
								</td>
							</tr>
						</logic:empty>
						<logic:notEmpty name="aqb" property="directCardNo">
							<tr>
								<td height="25" align="right">
									银行：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bank" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									卡号：
								</td>
								<td height="25">
									<bean:write name="aqb" property="directCardNo" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									开户行省份：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bankProv" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									开户行城市：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bankCity" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									开户支行名称：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bankName" />
								</td>
							</tr>
						</logic:notEmpty>
					</logic:equal>
					<!-- 付款给对方银行 -->
					<logic:equal name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_G%>">
						<tr>
							<td height="25" align="right">
								银行：
							</td>
							<td height="25">
								<bean:write name="aqb" property="directBank" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								卡号：
							</td>
							<td height="25">
								<bean:write name="aqb" property="directCardNo" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								开户行省份：
							</td>
							<td height="25">
								<bean:write name="aqb" property="bankProv" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								开户行城市：
							</td>
							<td height="25">
								<bean:write name="aqb" property="bankCity" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								开户支行名称：
							</td>
							<td height="25">
								<bean:write name="aqb" property="bankName" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								收款人姓名：
							</td>
							<td height="25">
								<bean:write name="aqb" property="personName" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								收款人email：
							</td>
							<td height="25">
								<bean:write name="aqb" property="personMail" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								收款人电话：
							</td>
							<td height="25">
								<bean:write name="aqb" property="personPhone" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								收款人手机：
							</td>
							<td height="25">
								<bean:write name="aqb" property="personMobile" />
							</td>
						</tr>
					</logic:equal>
					<!-- 线下汇款充值 -->
					<logic:equal name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_B%>">
						<tr>
							<td height="25" align="right">
								汇款省份：
							</td>
							<td height="25">
								<bean:write name="aqb" property="bankProv" />
							</td>
						</tr>
						<tr>
							<td height="25" align="right">
								汇款城市：
							</td>
							<td height="25">
								<bean:write name="aqb" property="bankCity" />
							</td>
						</tr>
						<!-- 邮局汇款没有开户支行名称一项 -->
						<logic:notEmpty name="aqb" property="bankName">
							<tr>
								<td height="25" align="right">
									开户支行名称：
								</td>
								<td height="25">
									<bean:write name="aqb" property="bankName" />
								</td>
							</tr>
						</logic:notEmpty>
						<!-- 个人账户的银行汇款没有汇款人名称和汇款人账号两项，只有企业账户有这两项 -->
						<logic:notEmpty name="aqb" property="personName">
							<tr>
								<td height="25" align="right">
									汇款人名称：
								</td>
								<td height="25">
									<bean:write name="aqb" property="personName" />
								</td>
							</tr>
							<tr>
								<td height="25" align="right">
									汇款人账号：
								</td>
								<td height="25">
									<bean:write name="aqb" property="directCardNo" />
								</td>
							</tr>
						</logic:notEmpty>
					</logic:equal>
					<!-- 银行卡充值，冲正，内部账户转账，电话银行充值，卡到账户，账户到卡：不显示商品信息，资金用途和备注三项 -->
					<logic:notEqual name="aqb" property="actionType"
						value="<%=Constant.ACTION_TYPE_A%>">
						<logic:notEqual name="aqb" property="actionType"
							value="<%=Constant.ACTION_TYPE_E%>">
							<logic:notEqual name="aqb" property="actionType"
								value="<%=Constant.ACTION_TYPE_H%>">
								<logic:notEqual name="aqb" property="actionType"
									value="<%=Constant.ACTION_TYPE_K%>">
									<logic:notEqual name="aqb" property="actionType"
										value="<%=Constant.ACTION_TYPE_X%>">
										<logic:notEqual name="aqb" property="actionType"
											value="<%=Constant.ACTION_TYPE_Y%>">

											<!-- 线下汇款充值，卡付款：不显示商品信息，资金用途两项，显示备注一项 -->
											<logic:notEqual name="aqb" property="actionType"
												value="<%=Constant.ACTION_TYPE_B%>">
												<logic:notEqual name="aqb" property="actionType"
													value="<%=Constant.ACTION_TYPE_Q%>">
													<!-- 提现，账户付款给对方银行：不显示商品信息，显示资金用途，备注两项 -->
													<logic:notEqual name="aqb" property="actionType"
														value="<%=Constant.ACTION_TYPE_D%>">
														<logic:notEqual name="aqb" property="actionType"
															value="<%=Constant.ACTION_TYPE_G%>">
															<tr>
																<td height="25" align="right">
																	商品信息：
																</td>
																<td height="25">
																	<bean:write name="aqb" property="t.commodityInfo" />
																</td>
															</tr>
														</logic:notEqual>
													</logic:notEqual>
													<tr>
														<td height="25" align="right">
															资金用途：
														</td>
														<td height="25">
															<bean:write name="aqb" property="t.purpose" />
														</td>
													</tr>
												</logic:notEqual>
											</logic:notEqual>
											<logic:notPresent name="operate">
												<tr>
													<td height="25" align="right">
														退款金额：
													</td>
													<td height="25">
														<bean:write name="aqb" property="returnAmount" />
													</td>
												</tr>
											</logic:notPresent>
											<tr>
												<td height="25" align="right">
													备注：
												</td>
												<td height="25">
													<bean:write name="aqb" property="femark" />
												</td>
											</tr>
											<logic:present name="operate">
												<tr>
													<td height="25" align="right">
														退款金额：
													</td>
													<td height="25">
														<logic:equal name="operate" value="apply">
															<input type="text" id="amount" name="amount"
																value="<bean:write name="aqb" property="amount" />"
																onchange="roundFun(this.value)" />
														</logic:equal>
														<logic:equal name="operate" value="confirm">
															<input type="hidden" name="amount" id="amount"
																value="<bean:write name="aqb" property="returnAmount" />" />
															<bean:write name="aqb" property="returnAmount" />
														</logic:equal>
													</td>
												</tr>
											</logic:present>
										</logic:notEqual>
									</logic:notEqual>
								</logic:notEqual>
							</logic:notEqual>
						</logic:notEqual>
					</logic:notEqual>
					<logic:notEmpty name="history">
						<logic:equal name="audited" value="true">
							<tr>
								<td colspan="2">
									<table width="100%" class="tablestyle">
										<tr height="36">
											<th>
												<span class="blue14">审核人</span>
											</th>
											<th>
												<span class="blue14">审核时间</span>
											</th>
											<th>
												<span class="blue14">处理动作</span>
											</th>
											<th>
												<span class="blue14">处理意见</span>
											</th>
										</tr>
										<c:forEach var="id" items="${history}" varStatus="status">
											<c:if test="${status.index % 2 == 0}">
												<tr height="28" align="center" class="tableWhiteBg">
											</c:if>
											<c:if test="${status.index % 2 == 1}">
												<tr height="28" align="center" class="tableBlueBg">
											</c:if>
											<td>
												<bean:write name="id" property="updateUserName" />
											</td>
											<td>
												<bean:write name="id" property="auditOperation.updateTime"
													format="yyyy-MM-dd HH:mm:ss" />
											</td>
											<td>
												<logic:equal name="id" property="created" value="true">创建</logic:equal>
												<logic:equal name="id" property="submitted" value="true">提交</logic:equal>
												<logic:equal name="id" property="aggreed" value="true">同意</logic:equal>
												<logic:equal name="id" property="rejected" value="true">拒绝</logic:equal>
											</td>
											<td>
												<bean:write name="id" property="auditOperation.attitude" />
											</td>
											</tr>
										</c:forEach>
									</table>
								</td>
							</tr>
						</logic:equal>
					</logic:notEmpty>
					<logic:equal name="aqb" property="accountType" value="B">
						<logic:notEqual name="aqb" property="voucherCodeShow"
							value="deny_get_voucher_code">
							<tr>
								<td colspan="3">
									<br />
								<table width="100%" border="0" align="center" cellpadding="7"
										cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
										<tr>
											<td bgcolor="#fffdf5">
												<table width="100%" border="0" cellpadding="3"
													cellspacing="0">
													<tr>
														<td width="3%" height="25" valign="top"
															style="border-bottom:1px solid #ccc;"></td>
														<td width="97%" align="left" class="red12b"
															style="border-bottom:1px solid #ccc;">
															特别提醒
														</td>
													</tr>
													<tr>
														<td valign="top">
															&nbsp;
														</td>
														<td align="left" class="font_gray">
															<span class="text9green"> </span>如果需要打印回单，为了保证打印的效果，请做如下的设置：
														</td>
													</tr>
													<tr>
														<td valign="top">
															&nbsp;
														</td>
														<td align="left" class="font_gray">
															<span class="text9green"> </span>选择IE浏览器中的"工具"-->"Internet选项"-->"高级"中的"打印"-->"打印背景颜色和图像"
														</td>
													</tr>
													<tr>
														<td valign="top">
															&nbsp;
														</td>
														<td align="left" class="font_gray">
															<span class="text9green"> </span>选择IE浏览器中的"文件"-->"页面设置"-->把"页眉"和"页脚"的内容清空
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</logic:notEqual>
					</logic:equal>
					<tr>
						<td height="41" align="right">
							<logic:equal name="aqb" property="t.actionType.id" value="2">
								<logic:notEqual name="aqb" property="t.transStatus" value="3">
									<logic:empty name="aqb" property="t.bankSeq">
										<input type="button" value="修改" class="button_style"
											onclick="toUrl('<%=path%>/page/transaction/toModifyPostRemitInpour.do?transId=<bean:write name="aqb" property="t.transId"/>');" />
									</logic:empty>
									<logic:notEmpty name="aqb" property="t.bankSeq">
										<input type="button" value="修改" class="button_style"
											onclick="toUrl('<%=path%>/page/transaction/toModifyBankRemitInpour.do?transId=<bean:write name="aqb" property="t.transId"/>');" />
									</logic:notEmpty>
								</logic:notEqual>
							</logic:equal>
							<logic:equal name="aqb" property="accountType" value="B">
								<logic:notEqual name="aqb" property="voucherCodeShow"
									value="deny_get_voucher_code">
									<input type="button" value="打印回单" class="button_style"
										onclick="if(confirmPrint()) printPaper('<bean:write name="aqb" property="tid"/>')" />
								</logic:notEqual>
							</logic:equal>
						</td>
						<td align="left">
							<%
										if (user != null
										&& (Constant.ACCOUNT_TYPE_CORPORATION.equals(user
										.getAccount().getAccountType()) || Constant.ACCOUNT_TYPE_INITIAL
										.equals(user.getAccount().getAccountType()))) {
							%>
							<logic:equal name="aqb" property="transStatus" value="3">
								<logic:notEmpty name="aqb" property="sellerUrl">
									<input type="button" value="通知" class="button_style"
										onclick="sendMessage('<bean:write name="aqb" property="transId" />');" />
								</logic:notEmpty>
							</logic:equal>
							<%
							}
							%>
							<logic:present name="operate">
								<logic:equal name="operate" value="apply">
									<logic:equal name="aqb" property="transStatus" value="1">
										<input name="button" type="button" class="button_style"
											onclick="returnMoney('7', '<bean:write name="aqb" property="transStatus"/>', '申请退款');"
											value="申请退款" />
									</logic:equal>
									<logic:equal name="aqb" property="transStatus" value="2">
										<input name="button" type="button" class="button_style"
											onclick="returnMoney('7', '<bean:write name="aqb" property="transStatus"/>', '申请退款');"
											value="申请退款" />
									</logic:equal>
								</logic:equal>
								<logic:equal name="operate" value="confirm">
									<logic:equal name="aqb" property="transStatus" value="7">
										<input name="button" type="button" class="button_style"
											onclick="returnMoney('8', '<bean:write name="aqb" property="transStatus"/>', '拒绝退款');"
											value="拒绝退款" />
										<input name="button" type="button" class="button_style"
											onclick="returnMoney('9', '<bean:write name="aqb" property="transStatus"/>', '同意退款');"
											value="同意退款" />
									</logic:equal>
									<logic:equal name="aqb" property="transStatus" value="8">
										<input name="button" type="button" class="button_style"
											onclick="returnMoney('9', '<bean:write name="aqb" property="transStatus"/>', '同意退款');"
											value="同意退款" />
									</logic:equal>
								</logic:equal>
							</logic:present>
							<input name="button" type="button" class="button_style"
								onclick="javascript:history.back();" value="返 回" />
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<form action="" id="returnMoney" method="POST">
	<input type="hidden" name="tranid">
	<input type="hidden" name="returnAmount">
	<input type="hidden" name="tranStatus">
	<input type="hidden" name="isIfFinished">
	<input type="hidden" name="oldTranStatus">
</form>
<iframe id="netreturn" src="<%=path%>/page/common/blankforiframe.jsp"
	width="100%" height="25" marginwidth="0" marginheight="0"
	style="display:none" frameborder="0" scrolling="no"></iframe>

<script language=javascript>
function FormatNumber(srcStr,nAfterDot){
    var srcStr,nAfterDot;
    var resultStr,nTen;
    srcStr = ""+srcStr+"";
    strLen = srcStr.length;
    dotPos = srcStr.indexOf(".",0);
    if (dotPos == -1){
        resultStr = srcStr+".";
        for (i=0;i<nAfterDot;i++){
            resultStr = resultStr+"0";
        }
        return resultStr;
    } else{
        if ((strLen - dotPos - 1) >= nAfterDot){
            nAfter = dotPos + nAfterDot + 1;
            nTen =1;
            for(j=0;j<nAfterDot;j++){
            nTen = nTen*10;
        }
        resultStr = Math.round(parseFloat(srcStr)*nTen)/nTen;
        return resultStr;
        } else{
            resultStr = srcStr;
            for (i=0;i<(nAfterDot - strLen + dotPos + 1);i++){
                resultStr = resultStr+"0";
            }
            return resultStr;
        }
    }
}
function roundFun(numberRound){
	var theForm = document.getElementById('returnMoney');
	var formtAmount = theForm.returnAmount.value = document.getElementById('amount').value;
	var sDispMsg = getChineseCurrencyString(theForm.returnAmount.value);
	if(sDispMsg==-1) { 
			alert('退款金额不合法,请重新输入!!!');
			document.getElementById('amount').value = '';
			return;
	}  else {
		document.getElementById('amount').value = FormatNumber(formtAmount,2);
	}
}
function returnMoney(transStatus, oldTransStatus, title) {
	var str = "您确定要"+title+"吗?";
	if (title=='申请退款'){
        var str = "1、您如果对此项交易存在疑义，或决定不再购买此商品，可申请退款。目前仅支持全额退款。\n";
        str = str+"2、如您已收到卖家商品，但商品不完全符合您的要求，您仍愿意接受商品，但希望卖家部分退款时：\n";
        str = str+"第一步，请点击申请退款；\n";
        str = str+"第二步，请与卖家协商重新发起一笔新的交易；\n";
        str = str+"第三步，新的交易进行付款时，在备注栏注明：此笔交易替换一笔申请退款的交易，同时注明详细交易信息，包括交易号、交易金额、商品信息、交易开始日期、交易结束日期；\n";
        str = str+"第四步，新的交易完成；\n";
        str = str+"第五步，双方确认上笔退款。\n";
        str = str+"3、双方就退款流程、退款方式，发生歧义时，请联系客服协助处理。";
    } 
	if (confirm(str)) {
		var theForm = document.getElementById('returnMoney');
		var realTrasAmount = '<bean:write name="aqb" property="amount" />';
		theForm.returnAmount.value = document.getElementById('amount').value;
		var formatAmount = parseFloat(theForm.returnAmount.value);
		if ( formatAmount < 0 || formatAmount > parseFloat(realTrasAmount)) {
			alert('退款金额不合法,请重新输入!');
			return;
		}
		theForm.tranid.value = '<bean:write name="aqb"  property="transId"/>';
		theForm.tranStatus.value = transStatus;
		theForm.isIfFinished.value = false;
		theForm.oldTranStatus.value = oldTransStatus;
		theForm.action="<%=path%>/page/transaction/accountList.do";
		theForm.submit();
	}
}
</script>
